package com.smxy.daydayup.util.osa;

import com.smxy.daydayup.util.osa.impl.local.LocalDiskOSAProvider;
import com.smxy.daydayup.util.osa.impl.local.LocalDiskProperties;
import com.smxy.daydayup.util.osa.mapper.ObjectStorageInfoMapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * @Author: yusy
 * @Date: 2022/10/21
 */
@Configuration
@MapperScan(basePackages = {
        "com.smxy.daydayup.util.osa.mapper",
})
public class OSASharedConfig {

    @Bean
    @Primary
    public OSAProvider localDiskOSAProvider(
            LocalDiskProperties localDiskProperties, ObjectStorageInfoMapper objectStorageInfoMapper
    ) {
        return new LocalDiskOSAProvider(localDiskProperties,objectStorageInfoMapper );
    }
}
